#include <hxcpp.h>

#ifndef INCLUDED_Std
#include <Std.h>
#endif
#ifndef INCLUDED_Sys
#include <Sys.h>
#endif
#ifndef INCLUDED_cpp_CppInt32__
#include <cpp/CppInt32__.h>
#endif
#ifndef INCLUDED_haxe_Int64
#include <haxe/Int64.h>
#endif
#ifndef INCLUDED_haxe_Timer
#include <haxe/Timer.h>
#endif
#ifndef INCLUDED_haxe_io_Input
#include <haxe/io/Input.h>
#endif
#ifndef INCLUDED_jax_io_JCloseable
#include <jax/io/JCloseable.h>
#endif
#ifndef INCLUDED_jax_io_JFilterOutputStream
#include <jax/io/JFilterOutputStream.h>
#endif
#ifndef INCLUDED_jax_io_JInputStream
#include <jax/io/JInputStream.h>
#endif
#ifndef INCLUDED_jax_io_JOutputStream
#include <jax/io/JOutputStream.h>
#endif
#ifndef INCLUDED_jax_io_JPrintStream
#include <jax/io/JPrintStream.h>
#endif
#ifndef INCLUDED_jax_lang_JAutoClosable
#include <jax/lang/JAutoClosable.h>
#endif
#ifndef INCLUDED_jax_lang_JOutputStream
#include <jax/lang/JOutputStream.h>
#endif
#ifndef INCLUDED_jax_lang_JSystem
#include <jax/lang/JSystem.h>
#endif
namespace jax{
namespace lang{

Void JSystem_obj::__construct()
{
	return null();
}

JSystem_obj::~JSystem_obj() { }

Dynamic JSystem_obj::__CreateEmpty() { return  new JSystem_obj; }
hx::ObjectPtr< JSystem_obj > JSystem_obj::__new()
{  hx::ObjectPtr< JSystem_obj > result = new JSystem_obj();
	result->__construct();
	return result;}

Dynamic JSystem_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JSystem_obj > result = new JSystem_obj();
	result->__construct();
	return result;}

::jax::io::JPrintStream JSystem_obj::err;

::jax::io::JInputStream JSystem_obj::in__;

::jax::lang::JOutputStream JSystem_obj::out;

::jax::io::JInputStream JSystem_obj::getIn( ){
	HX_SOURCE_PUSH("JSystem_obj::getIn")
	HX_SOURCE_POS("Source/jax/lang/JSystem.hx",17)
	return ::jax::lang::JSystem_obj::in__;
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JSystem_obj,getIn,return )

::jax::lang::JOutputStream JSystem_obj::getOutput( ){
	HX_SOURCE_PUSH("JSystem_obj::getOutput")
	HX_SOURCE_POS("Source/jax/lang/JSystem.hx",20)
	return ::jax::lang::JOutputStream_obj::__new();
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JSystem_obj,getOutput,return )

::haxe::Int64 JSystem_obj::nanoTime( ){
	HX_SOURCE_PUSH("JSystem_obj::nanoTime")
	struct _Function_1_1{
		inline static ::haxe::Int64 Block( ){
			{
				HX_SOURCE_POS("Source/jax/lang/JSystem.hx",24)
				int x = ::Std_obj::_int(::haxe::Timer_obj::stamp());
				HX_SOURCE_POS("Source/jax/lang/JSystem.hx",24)
				return ::haxe::Int64_obj::__new(::cpp::CppInt32___obj::ofInt((int(x) >> int((int)31))),::cpp::CppInt32___obj::ofInt(x));
			}
			return null();
		}
	};
	HX_SOURCE_POS("Source/jax/lang/JSystem.hx",23)
	return ::haxe::Int64_obj::mul(_Function_1_1::Block(),::haxe::Int64_obj::__new(::cpp::CppInt32___obj::ofInt((int)0),::cpp::CppInt32___obj::ofInt((int)1000)));
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(JSystem_obj,nanoTime,return )


JSystem_obj::JSystem_obj()
{
}

void JSystem_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JSystem);
	HX_MARK_END_CLASS();
}

void JSystem_obj::__Visit(HX_VISIT_PARAMS)
{
}

Dynamic JSystem_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"err") ) { return err; }
		if (HX_FIELD_EQ(inName,"out") ) { return out; }
		break;
	case 4:
		if (HX_FIELD_EQ(inName,"in__") ) { return in__; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"getIn") ) { return getIn_dyn(); }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"nanoTime") ) { return nanoTime_dyn(); }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"getOutput") ) { return getOutput_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JSystem_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"err") ) { err=inValue.Cast< ::jax::io::JPrintStream >(); return inValue; }
		if (HX_FIELD_EQ(inName,"out") ) { out=inValue.Cast< ::jax::lang::JOutputStream >(); return inValue; }
		break;
	case 4:
		if (HX_FIELD_EQ(inName,"in__") ) { in__=inValue.Cast< ::jax::io::JInputStream >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JSystem_obj::__GetFields(Array< ::String> &outFields)
{
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	HX_CSTRING("err"),
	HX_CSTRING("in__"),
	HX_CSTRING("out"),
	HX_CSTRING("getIn"),
	HX_CSTRING("getOutput"),
	HX_CSTRING("nanoTime"),
	String(null()) };

static ::String sMemberFields[] = {
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
	HX_MARK_MEMBER_NAME(JSystem_obj::err,"err");
	HX_MARK_MEMBER_NAME(JSystem_obj::in__,"in__");
	HX_MARK_MEMBER_NAME(JSystem_obj::out,"out");
};

static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(JSystem_obj::__mClass,"__mClass");
	HX_VISIT_MEMBER_NAME(JSystem_obj::err,"err");
	HX_VISIT_MEMBER_NAME(JSystem_obj::in__,"in__");
	HX_VISIT_MEMBER_NAME(JSystem_obj::out,"out");
};

Class JSystem_obj::__mClass;

void JSystem_obj::__register()
{
	Static(__mClass) = hx::RegisterClass(HX_CSTRING("jax.lang.JSystem"), hx::TCanCast< JSystem_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics, sVisitStatics);
}

void JSystem_obj::__boot()
{
	hx::Static(err);
	hx::Static(in__) = ::jax::io::JInputStream_obj::__new(::Sys_obj::_stdin());
	hx::Static(out) = ::jax::lang::JOutputStream_obj::__new();
}

} // end namespace jax
} // end namespace lang
